<template>
  <div class="home-page">
    <el-row>
      <el-col :span="24">
        <el-card :body-style="{ padding: '20px' }">
          <h2>欢迎来到首页</h2>
          <p>这里是台球厅管理系统的首页。</p>
          <el-button type="primary" @click="goToStoreManagement">进入门店管理</el-button>
        </el-card>
      </el-col>
    </el-row>

    <el-row class="statistics" gutter={20}>
      <el-col :span="8">
        <el-card class="box-card">
          <div class="text-center">
            <i class="el-icon-house" style="font-size: 30px;"></i>
            <h3>门店总数</h3>
            <p>5</p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="box-card">
          <div class="text-center">
            <i class="el-icon-user" style="font-size: 30px;"></i>
            <h3>用户总数</h3>
            <p>120</p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="box-card">
          <div class="text-center">
            <i class="el-icon-basketball" style="font-size: 30px;"></i>
            <h3>预约总数</h3>
            <p>150</p>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  methods: {
    goToStoreManagement() {
      this.$router.push('/home/store-management'); // 跳转到门店管理页面
    },
  },
};
</script>

<style scoped>
.home-page {
  padding: 20px;
}

h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.text-center {
  text-align: center;
}

.statistics .box-card {
  padding: 20px;
  text-align: center;
}

.statistics .box-card .el-icon {
  color: #409eff;
  margin-bottom: 10px;
}

.statistics .box-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.statistics .box-card p {
  font-size: 18px;
  font-weight: bold;
}
</style>
